<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include/include :: header('修改菜单')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="editForm"
			th:action="@{/admin/menu}" th:object="${viewobject}">
			<input name="menuId" type="hidden" th:field="*{menuId}" /> <input
				id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
			<input type="hidden" name="oper" id="oper" th:value="${oper}" />
			<div class="form-group">
				<label class="col-sm-3 control-label">上级菜单：</label>
				<div class="col-sm-8">
					<div class="input-group">
						<input class="form-control" type="text"
							th:onclick="selectMenuTree()" id="treeName" readonly="true"
							th:value="${viewobject.parentName == null ? '无' : viewobject.parentName}">
						<span class="input-group-addon"><i class="fa fa-search"></i></span>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">菜单类型：</label>
				<div class="col-sm-8">
					<label class="radio-box"> <input type="radio"
						th:field="*{type}" name="type" value="0" /> 菜单
					</label> <label class="radio-box"> <input type="radio"
						th:field="*{type}" name="type" value="1" /> 按钮
					</label>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">菜单名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" id="name"
						th:field="*{name}" maxlength="20" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">组件路径：</label>
				<div class="col-sm-8">
					<input id="path" name="path" class="form-control" type="text"
						th:field="*{path}" maxlength="100">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">权限标识：</label>
				<div class="col-sm-8">
					<input id="permission" name="permission" class="form-control"
						type="text" th:field="*{permission}" maxlength="20"> <span
						class="help-block m-b-none"><i class="fa fa-info-circle"></i>
						控制器中定义的权限标识，如：@PreAuthorize("@pms.hasPermission('')")</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">显示排序：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="sor"
						th:field="*{sort}" maxlength="3" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">图标：</label>
				<div class="col-sm-8">
					<input id="icon" name="icon" class="form-control" type="text"
						placeholder="选择图标" th:field="*{icon}" readonly="readonly">
					<div class="ms-parent" style="width: 100%;">
						<div class="icon-drop animated flipInX"
							style="display: none; max-height: 200px; overflow-y: auto">
							<div data-th-include="sysadm/menu/icon"></div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include/include :: footer" />
	<script th:src="@{/pages/sysadm/menu/menuEdit.js}"></script>
</body>
</html>
